﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.Mdeol;
using ExamSystem.BLL;
namespace ExamSystem.ht
{
    public partial class Login : System.Web.UI.Page
    {
        private TuserBLL tb=new TuserBLL() ;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            //获取值
            string uid = this.uid.Value;
            string pid = this.pid.Value;
            if(string.IsNullOrEmpty(uid))
            {
                this.lbMsg.InnerText = "请输入用户名";
            }
            if (string.IsNullOrEmpty(pid))
            {
                this.lbMsg.InnerText = "请输入密码";
            }
            Tuser t = tb.islogin(uid, pid);
            if (t!=null)
            {
                Session["uid"] = uid;
                Response.Redirect("Index.aspx");
                
            }
            else
            {
                this.lbMsg.InnerText = "信息错误";
            }
        }
    }
}